<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<input type="text">
<script src="./axios.js"></script>
<script>
let input = document.getElementsByTagName('input')[0]

axios.defaults.baseURL = 'http://localhost:3000' //设置默认

function getA(){
    return axios.get('/user?id=999')
}
function getB(){
    return axios.get('/cate?id=999')
}

axios.all([getA(),getB()]).then(data=>{
    console.log(data)
})

</script>
</body>
</html>